\(\int \frac {1}{(a-a \sec ^2(c+d x))^3} \, dx\) [150]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 55 \[ \int \frac {1}{\left (a-a \sec ^2(c+d x)\right )^3} \, dx=\frac {x}{a^3}+\frac {\cot (c+d x)}{a^3 d}-\frac {\cot ^3(c+d x)}{3 a^3 d}+\frac {\cot ^5(c+d x)}{5 a^3 d} \]

[Out]

x/a^3+cot(d*x+c)/a^3/d-1/3*cot(d*x+c)^3/a^3/d+1/5*cot(d*x+c)^5/a^3/d

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4205, 3554, 8} \[ \int \frac {1}{\left (a-a \sec ^2(c+d x)\right )^3} \, dx=\frac {\cot ^5(c+d x)}{5 a^3 d}-\frac {\cot ^3(c+d x)}{3 a^3 d}+\frac {\cot (c+d x)}{a^3 d}+\frac {x}{a^3} \]

[In]

Int[(a - a*Sec[c + d*x]^2)^(-3),x]

[Out]

x/a^3 + Cot[c + d*x]/(a^3*d) - Cot[c + d*x]^3/(3*a^3*d) + Cot[c + d*x]^5/(5*a^3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3554

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 4205

Int[(u_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[b^p, Int[ActivateTrig[u*tan[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = -\frac {\int \cot ^6(c+d x) \, dx}{a^3} \\ & = \frac {\cot ^5(c+d x)}{5 a^3 d}+\frac {\int \cot ^4(c+d x) \, dx}{a^3} \\ & = -\frac {\cot ^3(c+d x)}{3 a^3 d}+\frac {\cot ^5(c+d x)}{5 a^3 d}-\frac {\int \cot ^2(c+d x) \, dx}{a^3} \\ & = \frac {\cot (c+d x)}{a^3 d}-\frac {\cot ^3(c+d x)}{3 a^3 d}+\frac {\cot ^5(c+d x)}{5 a^3 d}+\frac {\int 1 \, dx}{a^3} \\ & = \frac {x}{a^3}+\frac {\cot (c+d x)}{a^3 d}-\frac {\cot ^3(c+d x)}{3 a^3 d}+\frac {\cot ^5(c+d x)}{5 a^3 d} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.04 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.65 \[ \int \frac {1}{\left (a-a \sec ^2(c+d x)\right )^3} \, dx=\frac {\cot ^5(c+d x) \operatorname {Hypergeometric2F1}\left (-\frac {5}{2},1,-\frac {3}{2},-\tan ^2(c+d x)\right )}{5 a^3 d} \]

[In]

Integrate[(a - a*Sec[c + d*x]^2)^(-3),x]

[Out]

(Cot[c + d*x]^5*Hypergeometric2F1[-5/2, 1, -3/2, -Tan[c + d*x]^2])/(5*a^3*d)

Maple [A] (verified)

Time = 0.25 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.80

method result size
derivativedivides \(\frac {\arctan \left (\tan \left (d x +c \right )\right )-\frac {1}{3 \tan \left (d x +c \right )^{3}}+\frac {1}{5 \tan \left (d x +c \right )^{5}}+\frac {1}{\tan \left (d x +c \right )}}{d \,a^{3}}\) \(44\)
default \(\frac {\arctan \left (\tan \left (d x +c \right )\right )-\frac {1}{3 \tan \left (d x +c \right )^{3}}+\frac {1}{5 \tan \left (d x +c \right )^{5}}+\frac {1}{\tan \left (d x +c \right )}}{d \,a^{3}}\) \(44\)
risch \(\frac {x}{a^{3}}+\frac {2 i \left (45 \,{\mathrm e}^{8 i \left (d x +c \right )}-90 \,{\mathrm e}^{6 i \left (d x +c \right )}+140 \,{\mathrm e}^{4 i \left (d x +c \right )}-70 \,{\mathrm e}^{2 i \left (d x +c \right )}+23\right )}{15 d \,a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{5}}\) \(75\)
parallelrisch \(\frac {-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+3 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+35 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-35 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+480 d x -330 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+330 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )}{480 d \,a^{3}}\) \(88\)
norman \(\frac {\frac {x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{a}+\frac {1}{160 a d}-\frac {7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{96 a d}+\frac {11 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{16 a d}-\frac {11 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{16 a d}+\frac {7 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{96 a d}-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}}{160 a d}}{a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}\) \(136\)

[In]

int(1/(a-a*sec(d*x+c)^2)^3,x,method=_RETURNVERBOSE)

[Out]

1/d/a^3*(arctan(tan(d*x+c))-1/3/tan(d*x+c)^3+1/5/tan(d*x+c)^5+1/tan(d*x+c))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 109 vs. \(2 (51) = 102\).

Time = 0.24 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.98 \[ \int \frac {1}{\left (a-a \sec ^2(c+d x)\right )^3} \, dx=\frac {23 \, \cos \left (d x + c\right )^{5} - 35 \, \cos \left (d x + c\right )^{3} + 15 \, {\left (d x \cos \left (d x + c\right )^{4} - 2 \, d x \cos \left (d x + c\right )^{2} + d x\right )} \sin \left (d x + c\right ) + 15 \, \cos \left (d x + c\right )}{15 \, {\left (a^{3} d \cos \left (d x + c\right )^{4} - 2 \, a^{3} d \cos \left (d x + c\right )^{2} + a^{3} d\right )} \sin \left (d x + c\right )} \]

[In]

integrate(1/(a-a*sec(d*x+c)^2)^3,x, algorithm="fricas")

[Out]

1/15*(23*cos(d*x + c)^5 - 35*cos(d*x + c)^3 + 15*(d*x*cos(d*x + c)^4 - 2*d*x*cos(d*x + c)^2 + d*x)*sin(d*x + c
) + 15*cos(d*x + c))/((a^3*d*cos(d*x + c)^4 - 2*a^3*d*cos(d*x + c)^2 + a^3*d)*sin(d*x + c))

Sympy [F]

\[ \int \frac {1}{\left (a-a \sec ^2(c+d x)\right )^3} \, dx=- \frac {\int \frac {1}{\sec ^{6}{\left (c + d x \right )} - 3 \sec ^{4}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} - 1}\, dx}{a^{3}} \]

[In]

integrate(1/(a-a*sec(d*x+c)**2)**3,x)

[Out]

-Integral(1/(sec(c + d*x)**6 - 3*sec(c + d*x)**4 + 3*sec(c + d*x)**2 - 1), x)/a**3

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.91 \[ \int \frac {1}{\left (a-a \sec ^2(c+d x)\right )^3} \, dx=\frac {\frac {15 \, {\left (d x + c\right )}}{a^{3}} + \frac {15 \, \tan \left (d x + c\right )^{4} - 5 \, \tan \left (d x + c\right )^{2} + 3}{a^{3} \tan \left (d x + c\right )^{5}}}{15 \, d} \]

[In]

integrate(1/(a-a*sec(d*x+c)^2)^3,x, algorithm="maxima")

[Out]

1/15*(15*(d*x + c)/a^3 + (15*tan(d*x + c)^4 - 5*tan(d*x + c)^2 + 3)/(a^3*tan(d*x + c)^5))/d

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 111 vs. \(2 (51) = 102\).

Time = 0.29 (sec) , antiderivative size = 111, normalized size of antiderivative = 2.02 \[ \int \frac {1}{\left (a-a \sec ^2(c+d x)\right )^3} \, dx=\frac {\frac {480 \, {\left (d x + c\right )}}{a^{3}} + \frac {330 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 35 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3}{a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}} - \frac {3 \, a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 35 \, a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 330 \, a^{12} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{15}}}{480 \, d} \]

[In]

integrate(1/(a-a*sec(d*x+c)^2)^3,x, algorithm="giac")

[Out]

1/480*(480*(d*x + c)/a^3 + (330*tan(1/2*d*x + 1/2*c)^4 - 35*tan(1/2*d*x + 1/2*c)^2 + 3)/(a^3*tan(1/2*d*x + 1/2
*c)^5) - (3*a^12*tan(1/2*d*x + 1/2*c)^5 - 35*a^12*tan(1/2*d*x + 1/2*c)^3 + 330*a^12*tan(1/2*d*x + 1/2*c))/a^15
)/d

Mupad [B] (verification not implemented)

Time = 18.41 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.75 \[ \int \frac {1}{\left (a-a \sec ^2(c+d x)\right )^3} \, dx=\frac {x}{a^3}+\frac {{\mathrm {tan}\left (c+d\,x\right )}^4-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2}{3}+\frac {1}{5}}{a^3\,d\,{\mathrm {tan}\left (c+d\,x\right )}^5} \]

[In]

int(1/(a - a/cos(c + d*x)^2)^3,x)

[Out]

x/a^3 + (tan(c + d*x)^4 - tan(c + d*x)^2/3 + 1/5)/(a^3*d*tan(c + d*x)^5)